
#ifndef VANTIDEL_CPP_COMMON_H
#define VANTIDEL_CPP_COMMON_H

#include <cstdio>
#include <cstdlib>
#include <cstdint>

class VM;
class Parser;
class Class;

#define UNUSED __attribute__ ((unused))

#ifdef DEBUG
#define ASSERT(condition, errMsg) \
	  do {\
	 if (!(condition)) {\
		fprintf(stderr, "ASSERT failed! %s:%d In function %s(): %s\n", \
		   __FILE__, __LINE__, __func__, errMsg); \
		abort();\
	 }\
	  } while (0);
#else
#define ASSERT(condition, errMsg) ((void)0)
#endif

#define NOT_REACHED()\
   do {\
      fprintf(stderr, "NOT_REACHED: %s:%d In function %s()\n", \
     __FILE__, __LINE__, __func__);\
      while (1);\
   } while (0);

#endif //VANTIDEL_CPP_COMMON_H
